package com.polymorphic.dynamic;

/**
 * @Author 小闽
 * @Date 2024/8/12 18:28
 * @PackageName: com.polymorphic.dynamic
 * @ClassName: DynamicBinding
 * @Description: 动态绑定机制
 * @Version 1.0
 */
public class DynamicBinding {
    public static void main(String[] args) {
       A a = new B();
        System.out.println(a.sum()); // 40
        System.out.println(a.sum1()); // 30
    }
}
